Skip to main content

MultiLanguageText Methods

An object defining methods for the MultiLanguageText class.

SetValueAsObject(value)

Sets the text values from a dictionary of culture-text pairs.

Parameters:

value (required): Dictionary<string, string>
A dictionary containing culture codes and their corresponding text values.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


SetUserCulture(culture)

Sets the user culture for text retrieval.

Parameters:

culture (required): string
The culture code to set as the user culture.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


SetDefaultCulture(culture)

Sets the default culture for text retrieval.

Parameters:

culture (required): string
The culture code to set as the default culture.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


SetText(text, culture)

Sets the text for the specified culture.

Parameters:

text (required): string
The text to set.

culture (optional): string
The culture code for which to set the text. If not specified, the user culture or default culture is used.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


SetEnabledMultiLanguageText(enableMultiLanguageText)

Enables or disables multi-language text support.

Parameters:

enableMultiLanguageText (required): bool
A boolean value indicating whether to enable multi-language text support.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


GetData()

Retrieves the dictionary of culture-text pairs.

Returns:

Type: Dictionary<string, string>
The dictionary containing culture codes and their corresponding text values.

This is a sync method. Method runs synchronously.


RemoveAll()

Removes all texts for all cultures.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


RemoveText(culture)

Removes the text for the specified culture.

Parameters:

culture (optional): string
The culture code for which to remove the text. If not specified, the user culture or default culture is used.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


GetText(culture)

Retrieves the text for the specified culture or the best available culture.

Parameters:

culture (optional): string
The culture code for which to retrieve the text. If not specified, the user culture or default culture is used.

Returns:

Type: string
The text corresponding to the specified or best available culture.

This is a sync method. Method runs synchronously.